@import "../../base.less";

@import "./_var.less";

@segmented-control-cls: ~"@{prefix}-segmented-control";

.@{segmented-control-cls} {
  width: 100%;
  height: @segmented-control-height;
  box-sizing: border-box;

  &__list {
    display: flex;
    align-items: center;
    width: 100%;
    height: 100%;
    position: relative;
    border-radius: @segmented-control-border-radius;
    overflow: hidden;
    background-color: @segmented-control-bg-color;
    border: 1px solid @segmented-control-active-bg-color;
  }

  &__item {
    flex-basis: 0;
    flex-grow: 1;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: @segmented-control-active-bg-color;
    position: relative;
    cursor: pointer;
    user-select: none;
    font-size: @segmented-control-text-size;

    // &::before {
    //   .hairline-left(@color: @segmented-control-active-bg-color);
    // }
    border-left: 1px solid @segmented-control-active-bg-color;

    &:first-child {

      // &::before {
      //   border: unset;
      // }
      border-left: unset;
    }

    &.@{prefix}-is-active {
      background-color: @segmented-control-active-bg-color;
      color: @segmented-control-active-text-color;
    }
  }
}
